package com.itlong.cloud.POJO.PO;

import com.itlong.cloud.annotation.ItlField;
import com.itlong.cloud.annotation.ItlTables;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

/**
 * <desc>
 *      运营用户实体类
 * </desc>
 *
 * @createDate 2017/9/13
 */
@Data
@NoArgsConstructor
@ItlTables("operate_user_info")
@EqualsAndHashCode(callSuper = true)
public class OperateUserInfoPO extends BasePO implements Serializable{
    @ItlField(value = "user_id",logicKey = "key")
    private String userId;                          //用户id
    @ItlField("group_id")
    private String groupId;                         //部门id
    @ItlField("user_num")
    private String userNum;                         //用户编号
    @ItlField("user_name")
    private String userName;                        //用户名
    @ItlField("real_name")
    private String realName;                        //姓名
    @ItlField("password")
    private String password;                        //密码
    @ItlField(value = "phone_num",notNull = "false")
    private BigInteger phoneNum;                    //手机号
    @ItlField("gender")
    private Integer gender;                         //性别： 0女 1男
    @ItlField("birthday")
    private Date birthday;                          //生日
    @ItlField("description")
    private String description;                            //备注

    @ItlField("auth_type")
    private Integer authType;           //授权类型 1自定义 2长期有效

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ItlField("auth_start_time")
    private Date authStartTime;                   //授权开始时间

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ItlField("auth_end_time")
    private Date authEndTime;                     //授权结束时间
    @ItlField("password_time")
    private Date passwordTime;                          //上次修改密码时间
    private String token;                           //请求凭证
    private String roleId;                          //角色id 前端传参
    private String projectId;                      //项目id 前端传参
    private String roleName;                        //角色名
    //该属性判断是否是长时间未操作
    private Boolean isLongTimeNoOperation;
    private String mainSessionId;               //SSO前端用户唯一id
    private String secondarySessionId;          //预登陆系统唯一id
    private String operateSessionId;            //运营系统sessionId
    private String assessSessionId;             //报价系统sessionId
    private Integer type;                           //系统类型：1运营 2报价
    private Integer syncType;                   //同步类型：1保存用户 2更新用户 3删除用户
    private String syncRoleIds;                //同步角色id
    private String relationInfo;                //项目与用户关联列表
}
